﻿<UserControl 
    Focusable="True"
    x:Class="HeritageAcademy.Library.Controls.BookViewer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Controls="clr-namespace:HeritageAcademy.Library.Controls" 
    xmlns:ViewModel="clr-namespace:HeritageAcademy.Models.ViewModels;assembly=HeritageAcademy.Models">
  <Grid>

    <Controls:FlowDocumentPageViewerLight x:Name="Viewer" Foreground="{DynamicResource PageTextBrush}" FocusVisualStyle="{x:Null}" OverridesDefaultStyle="True" SelectionChanged="ViewerSelectionChanged" MinZoom="88" MaxZoom="136" ZoomIncrement="12" Zoom="{Binding Source={x:Static ViewModel:OptionsViewModel.Current}, Path=Zoom, Mode=TwoWay}" >
      <Controls:FlowDocumentPageViewerLight.Template>
        <ControlTemplate TargetType="{x:Type FlowDocumentPageViewer}">
          <AdornerDecorator>
            <Grid>
              <DocumentPageView FlowDocumentPageViewer.IsMasterPage="True"  />
            </Grid>
          </AdornerDecorator>
        </ControlTemplate>
      </Controls:FlowDocumentPageViewerLight.Template>
    </Controls:FlowDocumentPageViewerLight>
    
  </Grid>
</UserControl>
